package com.pk10;

import java.util.ArrayList;
import java.util.List;

public class GenericTypeTest {
    public static void main(String[] args) {
        System.out.println("ni hao");
        List<? extends Object> listObj = new ArrayList<>();
        List<String> listStr = new ArrayList<>();
//        listStr=listObj;
        listObj = listStr;
        Object o = listObj.get(1);

        List<? super String> listObj1 = new ArrayList<>();
        List<String> listStr1 = new ArrayList<>();
        listObj1 = listStr1;
        Object s = listObj1.get(1);
//        listObj1.add(1);

    }
}
